package com.sqrj.phoneorder.service;

import com.sqrj.phoneorder.common.JsonData;
import com.sqrj.phoneorder.dao.WebUserControlMapper;
import com.sqrj.phoneorder.model.WebUserControl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
//搅拌站信息
@Service
public class WebUserControlService {
    @Resource
    private WebUserControlMapper webUserControlMapper;
//  查询搅拌站集合
    public List<WebUserControl> queryUnit(){
       return  webUserControlMapper.queryUnit();
    }
//  查询搅拌站集合（地址）
    public List<WebUserControl> queryUnitByAddr(String province, String city, String district,Integer lx) {
//        if (StringUtils.isno(param.getStUnit())) {
//            dto.setStUnit("%" + param.getStUnit() + "%");
//        }

        return  webUserControlMapper.queryUnitByAddr(province,city,district,lx);
    }
//  查询搅拌站信息
    public WebUserControl getWebUserbyjbzCode(String jbzCode) {

        return webUserControlMapper.getWebUserbyjbzCode(jbzCode);
    }
//  查询搅拌站
    public WebUserControl findByCode(String jbzCode) {
        return webUserControlMapper.selectByPrimaryKey(jbzCode);
    }
}
